import Vue from 'vue'
import Router from 'vue-router'
import login from '../components/login'
import user from '../components/user'
import main from '../components/index'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/',
      name: 'login2',
      component: login
    },
    {
      path: '/main',
      name: 'main',
      component: main,
      children: [
        {
          path: '/user',
          name: 'user',
          component: user
        }
      ]
    }
  ]
})
